<div class="post ${_as == 'teaser' ? 'teaser' : ''}">
    <h2 class="post-title">
        <a href="@{Application.show(_post.id)}">${_post.title}</a>
    </h2>
    <div class="post-metadata">
        <span class="post-date">${_post.addTime.format('yy年MM月dd日')}</span>
        #{if _as != 'full'}
            <span class="post-comments">
                &nbsp;|&nbsp; <a href="@{Application.show(_post.id)}#comments">${_post.comments.size()} 条评论</a>
                #{if _post.comments}
                    , latest by ${_post.comments[0].author}
                #{/if}
            </span>
        #{/if}
        #{elseif _post.tags}
    			<span class="post-tags">
        		- Tags 
        		#{list items:_post.tags, as:'tag'}
            	<a href="@{Application.listTagged(tag.name)}">${tag}</a>${tag_isLast ? '' : ', '}
        		#{/list}
    			</span>
				#{/elseif}
    </div>
    #{if _as != 'teaser'}
        <div class="post-content">
            <div class="about">Detail: </div>
            ${_post.content.nl2br()}
        </div>
    #{/if}
</div>
 
#{if _as == 'full'}

    <div class="comments">
        <h3>
            ${_post.comments.size()} 条评论
        </h3>
        
        #{list items:_post.comments, as:'comment'}
            <div class="comment">
                <div class="comment-metadata">
                    <span class="comment-author">${comment.author} 说:</span>
                    <span class="comment-date">
                        ${comment.addTime.format('yy年MM月dd日')}
                    </span>
                </div>
                <div class="comment-content">
                    <div class="about">Detail: </div>
                    ${comment.content.escape().nl2br()}
                </div>
            </div>
        #{/list}
        
    </div>
    
#{/if}